1. Technical Field
The present invention relates in general to computer graphics systems and subsystems, and in particular to computer graphics subsystems having time-varying properties of display attributes. Still more particularly, the present invention relates to timing mechanisms for providing stereo display, brightness variation, or image blending in computer graphics systems and subsystems.
2. Description of the Related Art
In the field of Computer Graphics, a number of applications require the provision of stereo display capability. The stereo display provides the illusion of three-dimensional (3D) display from a two dimensional screen. In computer graphics, stereo display is generally used in such applications as molecular modelling, advanced CAD/CAM, architecture, and other applications, where stereo improves the understanding or visualization of a given problem set (Scientific Visualization). There is an emerging trend to use stereo display to provide so-called "Virtual Reality" to computer applications. While some of these applications are for Scientific Visualization, it is expected that the majority of the 3D and stereo applications will be for entertainment (games) and education. In order to realize the mass market potential of such applications, much commercial pressure is being applied to significantly improve the performance and reduce the complexity and cost of stereo display.
To create the illusion of three dimensional display from a two dimensional screen, a number of stereo techniques have been used in the prior art. All techniques seek to provide slightly different images, uniquely and independently, to each eye to mimic the natural stereo vision of the viewer. The prior art techniques are divided into those that provide separate images to the left and right eyes, either simultaneously or in succession. Those same techniques are applicable to most types of presentation medium, whether electronic (as with a computer CRT display) or optical (as with a movie screen). Computer displays, used in stereo 3D applications, are generally of the former category, presenting alternating frames uniquely to each eye from a single display screen. It is essential that the left eye does not perceive the frame intended for the right eye, and vice versa. This is achieved by fitting the user with goggles that block the view of the left eye when the frame intended for the right eye is displayed, and vice versa. Also, it is essential that the separate views provided to each eye be presented in a continuous succession of alternating display frames.
In computer graphics, an image to be displayed is divided into a number of discrete picture elements or pixels. Each pixel represents a physical position on the output display monitor and can have associated with it a color or specific shade of gray. In image and graphics systems, the pixels of a display are each represented by data stored in a memory device. This memory device storing this representation of a display is typically referred to as a frame buffer. A high resolution display, typically has an image of 1600.times.1280, or 2,048,000 pixels. Each pixel value can be represented by 1 to 32 or more bits, thus requiring a large amount of memory to store the image. This requirement for large amounts of high speed memory requires the use of high density memory devices, such as Dynamic Random Access Memories ("DRAMs").
The nature of video display scan patterns and update rates requires decoupling the updating of the frame buffer from the scanning out of the stored values (through video generation circuitry) for display on the video monitor. Consequently, a specialized form of DRAM memories, called Video RAMs (VRAMs), were developed for simultaneously displaying the contents of a graphics frame buffer to the screen, while allowing the graphics or image processor to update the frame buffer with new data. VRAMs contain two Input/Output ports (one for random access and one for serial access) and one address port. These memories are frequently referred to as dual-port memories.
Typically, stereo display is accomplished in computer graphics by utilizing "Double Buffer" techniques. Pixel display data being displayed as a double buffer is divided into two sub-pixel fields. These two fields are assigned as Buffer.sub.-- A and Buffer.sub.-- B. A "Buffer Select" signal provided by the system indicates which of the two buffers should be processed (according to other attributes) and displayed. By simply changing the Buffer Select signal, all double buffer pixels belonging to a double buffer application will immediately switch between Buffer.sub.-- A and Buffer.sub.-- B anywhere on the entire display. Alternatively and preferably, the palette DAC device can hold off the switch between Buffer A and Buffer.sub.-- B until the start of the next display frame.
When performing stereo display, Buffer.sub.-- A may contain the left eye image and Buffer.sub.-- B may contain the right eye image. At the end of each display frame, the stereo application can switch between Buffer.sub.-- A and Buffer.sub.-- B before the next display frame begins. Also, before the next display frame begins, the stereo application must signal to the stereo vision system that display has switched between the left eye and right eye. It is vital that the buffer switch, and the signaling to the stereo vision system, be accurately timed to the frame blanking period, otherwise the stereo display effect would be completely destroyed. The visual effect of any such mis-timing would be considerably worse than any such mis-timing for double-bufferred computer animation applications. Therefore, for stereo display, it is essential that the separate views provided to each eye be presented on alternating display frames. These separate views must be presented in continuous succession at a very high frame rate because each eye only sees half of the frames. In order to keep display flicker to a minimum, each eye should receive at least 60 frames per second, leading to an overall frame rate of at least 120 frames per second.
The main problem for stereo display using Double Buffer techniques is the timing and accurate synchronization of the switch between buffers. Stereo display requires a very high display frame rate and also requires that the switching between buffers occurs every frame. This is in contrast to double-bufferred animation, where the frame rate is lower and buffer switching occurs every few frames without the need for absolute frame synchronization. Stereo applications are not only required to control the Buffer Select very accurately, they must also accurately signal left/right switching to the stereo vision system to allow left/right blocking of the eyes.
Applications that provide time-varying properties to the display, such as Stereo applications, are generally run in the central processing unit (CPU) of the computer system. To provide the highly synchronized control needed to properly control these properties, the CPU will have to monitor the state of frame blanking in the computer's graphics system, generally using a "polling" method (although some graphics systems can provide vertical blanking interrupts). The method of "polling" relies on the software running in a continuous loop, while continually reading a status register waiting for that status to change--this is very wasteful of CPU cycles. The moment frame blanking occurs, the CPU must update the Buffer Select signal--for example, in an appropriate Window Attribute Table entry--and then signal the stereo vision system that the left/right switch has occurred. The CPU must time these operations very accurately, taking into account latencies (and bottlenecks) to and from the graphics system and the stereo vision system. If the CPU is running a Real-Time OS (Operating System), then sufficiently accurate timing can be achieved, however most computers (particularly desktop computers) do not run using a Real-Time OS. As such, a stereo application running in the CPU is often subject to major interruptions, potentially being swapped out for large periods, so the likelihood of mis-timing the buffer switch is fairly high. The problem can be partially alleviated by fully occupying the CPU with the stereo application, locking out all other applications, but everything else on the computer would come to a grinding halt, including potentially the OS itself. Not only is this bad programming style, but it also could cause the computer to "hang" or lock out the user, and it would still not guarantee perfect timing and synchronization of the switching between buffers and signaling to the stereo vision system. Thus, because the buffer selection must be performed in real-time to maintain the stereo effect and because it consumes a large amount of CPU and system bus cycles, the performance of the computer system is significantly reduced.